Skip to content

fix: Use correct JSON format for Claude Code stop hooks#109

Closed
nhorton wants to merge 3 commits intomainfrom
fix/stop-hook-json-format
Closed

fix: Use correct JSON format for Claude Code stop hooks#109
nhorton wants to merge 3 commits intomainfrom
fix/stop-hook-json-format

Conversation

@nhorton
Copy link
Contributor

@nhorton nhorton commented Jan 21, 2026

Summary

  • Fixes stop hook quality criteria validation using incorrect JSON response format
  • Changes from {"ok": true/false} to {} and {"decision": "block", "reason": "..."}
  • This is the correct format per Claude Code hook documentation

Test plan

  • Run deepwork sync after merge to regenerate skills
  • Test a job with quality_criteria to verify blocking works correctly
  • Verify that incomplete criteria now properly block agent completion

🤖 Generated with Claude Code

nhorton and others added 3 commits January 21, 2026 16:55
The stop hook quality criteria validation was using incorrect JSON response
format that Claude Code doesn't recognize:
- {"ok": true} - Ignored by Claude Code
- {"ok": false, "reason": "..."} - Not recognized as blocking

Changed to the correct format per Claude Code documentation:
- {} - Allow stop (empty JSON)
- {"decision": "block", "reason": "..."} - Block and continue

This fixes the issue where agents could declare quality criteria met without
proper validation blocking incorrect completions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update skill-template-best-practices rule with correct response format guidance
- Fix hooks_system.md examples to use {} and {"decision": "block", ...}
- Bump version to 0.5.1 and add changelog entry
- Regenerate skill files with updated templates

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@nhorton nhorton closed this Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant